<template>
  <div>
    <div class="lineChart" ref="lineChart"></div>
  </div>
</template>

<script>
import * as echarts from "echarts";
export default {
  props: {},
  components: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    let linechart = echarts.init(this.$refs.lineChart);
    linechart.setOption({
      //  x轴
      xAxis: {
		show: false,
		// 均分
        type: "category",
      },
      //   y轴
      yAxis: {
        show: false,
      },
      //   系列
      series: {
        type: "line",
        name: "访问量",
        data: [12, 30, 22, 30, 44, 10, 21, 56, 16],
        itemStyle: {
          opacity: "0",
		},
		// 线条的样式
        lineStyle: {
          color: "purple",
		},
		// 填充样式
        areaStyle: {
          colorStops: [
            {	
              offset: 0,
              color: "#aed0ee", // 0% 处的颜色
            },
            {
              offset: 1,
              color: "#6e9bc5", // 100% 处的颜色
            },
          ],
		},
		// 设置平滑
        smooth: true,
      },
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
      },
    });
  },
  methods: {},
};
</script>

<style scoped>
.lineChart {
	width: 100%;
  height: 50px;
}
</style>
